<?php

!defined('IN_NOVA') && exit('Access Denied!');

class Laodao {

	public function start() {
		global $theme,$cache,$request,$db;

		$theme->current_page = max( 1, $request->p );
		$theme->max_per_page = $cache->config['maxperpage'] * 2;

		$theme->title = L('_EMOTION_');
		$theme->content =  '<div id="laodao">';
		$theme->content .= '<ol id="laodao_list">' . $theme->get_laodao( ( $theme->current_page - 1 ) * $theme->max_per_page, $theme->max_per_page ) . '</ol>';
		$theme->content .= '<div id="laodao_navi">' . $theme->get_navigator( $db->result("SELECT COUNT(ld_id) FROM `" . DB_PREFIX . "laodao`"), 'laodao' ) . '</div></div>';
		$theme->load('page');
	}

}
?>
